/*
 * @Author: your name
 * @Date: 2022-01-06 15:54:07
 * @LastEditTime: 2022-01-06 15:58:24
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%A
 * 
 * @FilePath: \elementui\src\plugin\debounce.js
 */


// 防抖函数
let debounce=function(fn){
    var timer  =null;
    return function(){
        clearTimeout(timer);
        timer=setTimeout(function(){
            fn()
        },2000)
    }
}

export default debounce